﻿
create table Purchase(
  PurchaseID int IDENTITY(1,1) not null ,
  Title nvarchar(100) ,
  Description nvarchar(300) ,
  Price float,
  PersonRef int ,
PRIMARY KEY (PurchaseID)
)

--<< FOREIGNKEYS DEFINITION >>--
If not Exists (select 1 from sys.objects where name = 'FK_Purchase_PersonRef')
	ALTER TABLE [Purchase]  ADD  CONSTRAINT [FK_Purchase_PersonRef] FOREIGN KEY([PersonRef])
	REFERENCES [Person] ([PersonID])
GO	